home *** CD-ROM | disk | FTP | other *** search
- Path: rcp6.elan.af.mil!rscernix!danpop
- From: danpop@mail.cern.ch (Dan Pop)
- Newsgroups: comp.lang.c
- Subject: Re: Schildt <- Advanced Books
- Date: 1 Mar 96 13:41:03 GMT
- Organization: CERN European Lab for Particle Physics
- Message-ID: <danpop.825687663@rscernix>
- References: <8BA8405.02C70020DE.uuout@sourcebbs.com> <danpop.824685808@rscernix> <4gg4hn$fa8@hobbes.sco.COM> <danpop.824998634@rscernix> <4gnt96INN205@keats.ugrad.cs.ubc.ca> <4h4q0v$24v@redstone.interpath.net>
- NNTP-Posting-Host: ues5.cern.ch
- X-Newsreader: NN version 6.5.0 #7 (NOV)
-
- softbase@mercury.interpath.net (Scott McMahan - Softbase Systems) writes:
-
- >Herb Schildt seems to truly love C and want to help people learn it and
- >be an advocate for the language and all, but his enthusiasm doesn't
- >quite cover for some of his lapses in correctness. You know which
- >road they paved with good intentions. Other than using void main
- >and a few other things, he isn't that bad, and his books are
- >certainly better than a lot of the crap I've read. Believe me,
- >there's a lot worse than Herb out there.
-
- Sorry, I can hardly believe that. Here are two examples (originally
- posted by Lawrence Kirby) from page 53 of the _third_ edition of C-TCR:
-
- float f
- printf("%f ", sizeof f);
- printf("%d", sizeof(int));
-
- and
-
- void put_rec(int rec[6], FILE *fp)
- {
- int len;
-
- len = fwrite(rec, sizeof rec, 1, fp);
- if(len != 1) printf("write error");
- }
-
- Both examples contain errors that could be made only by someone who
- hasn't understood the language and are _very_ misleading for the
- beginner, especially the second example (any beginner should be able
- to spot (at least) one of the two mistakes in the first example).
-
- Both mistakes appeared in the second edition of the book, as well, and
- they are NOT typos. Ideally, the author shouldn't be allowed to
- publish anything on a topic he is utterly unable to understand.
- Unfortunately, the market realities of today are far from ideal :-(
-
- >Still and all, he does have the only book I've ever seen with a
- >recursive descent parser and a C interpreter in full source code form,
- >and since I'm writing a parser myself for another language that starts
- >with C and ends with OBOL, I'm kind of happy to have his book to see
- >how interpreters are written.
-
- Or how interpreters should not be written, if the code is written by
- Schildt and not pasted from another source.
-
- The point is that interpreters don't belong to a book about programming
- in C. There are plenty of books dedicated to the topic of compilers
- and interpreters written by competent people.
-
- Dan
- --
- Dan Pop
- CERN, CN Division
- Email: danpop@mail.cern.ch
- Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland
-